export const historyEvent = <T extends keyof History>(type:T):()=>any=>{
    const origin = history[type]
    return function (this:any){
        const result = origin.apply(this,arguments)
        let e = new Event(type)
        window.dispatchEvent(e)
        return result
    }
}
